
<?php
$dom=new DOMDocument();
$dom->load(NV_ROOTDIR.'/modules/'.$module_name.'/admin/vnxpress.xml');
$alo=$dom->firstChild;
$treedomMain='';
$treedomMain.='<div id="menu1" class="menuTree">';
nodeview($alo,1,'',&$treedomMain);
function nodeview($alo,$i,$xau,&$treedomMain)
{
		$blo=$alo->childNodes;
		$child=$blo->length;
		$name=$alo->nodeName.'['.$i.']';
		$xau.=$name.'/';
		if($child>-1)
		{
			
			$treedomMain.= '<li class="parent"><a alo="'.$xau.'">'.$name.'</a>';
   			$treedomMain.= '<ul>';
			$arr= array();$k=-1;
			foreach($blo as $b)
			{
				if($b->nodeName!='#text')
				{
					$arr[++$k]=$b->nodeName;$h=0;
					foreach($arr as $a)
					{
						
						if($a==$b->nodeName)
							$h++;
					}
					nodeview($b,$h,$xau,&$treedomMain);
				}
			}
			$treedomMain.= '</ul>';
			$treedomMain.= '</li>';
		}
		else
		{
			$treedomMain.= '<li class="child"><a alo="'.$xau.'">'.$name.'</a>';
			$treedomMain.= '</li>';
		}
}
$treedomMain.="</div>";
?>
